﻿@{
    Layout = null;
    ViewBag.Title = "添加用户——公路工程建设项目造价全过程管理系统";
}
@model DotNet.Model.MyEntity.Base_User
<script type="text/javascript">
    $(document).ready(function () {
        $("#form_Permission_Organize_CreateUser").submit(function () {
            return false;
        });
    });
   
</script>
<script src="@Url.Content("/Scripts/jQuery/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("/Scripts/jQuery/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<div class="pageContentD">
    @{Html.EnableClientValidation();}
    @using (Html.BeginForm("UserCreating", "Organize", null, FormMethod.Post, new { onsubmit = "return validateCallback(this,dialogCreated_Permission_Organize_CreateUser);", @id = "form_Permission_Organize_CreateUser", @class = "pageForm" }))
    { 
        <div class="pageFormContent" layouth="60">
            @Html.Raw(Model == null || Model.Id == null ? "" : "<input type=\"hidden\" value=\"" + Model.Id + "\" id=\"Id\" name=\"Id\" />")
            <table width="95%" class="tab01">
                <tr>
                    <td class="td1">
                        <label>
                            用户名：</label>
                    </td>
                    <td>
                        @Html.TextBoxFor(m => m.UserName) @Html.ValidationMessageFor(m => m.UserName)
                    </td>
                </tr>
                @* <tr>
            <td class="td1">
                <label>
                    姓 名：</label>
            </td>
            <td>
                @Html.TextBoxFor(m => m.RealName) @Html.ValidationMessageFor(m => m.RealName)
            </td>
        </tr>   
        <tr>
            <td class="td1">
                <label>
                    编 号</label>
            </td>
            <td>
                @Html.TextBoxFor(m => m.Code)
            </td>
        </tr>*@
                <tr>
                    <td class="td1">
                        <label>
                            默认角色</label>
                    </td>
                    <td>
                        @Html.DropDownListFor(m => m.RoleId, new SelectList(ViewBag.roleList as System.Collections.IEnumerable, "Id", "Realname"), "--请选择角色--")
                    </td>
                </tr>
                <tr>
                    <td class="td1">
                        <label>
                            密 码：</label>
                    </td>
                    <td>
                        @Html.PasswordFor(m => m.UserAddressId)
                        @Html.ValidationMessageFor(m => m.UserPassword)
                    </td>
                </tr>
                <tr>
                    <td class="td1">
                        <label>
                            确认密码：</label>
                    </td>
                    <td>
                        @Html.PasswordFor(m => m.tUserPassword)
                        @Html.ValidationMessageFor(m => m.tUserPassword)
                    </td>
                </tr>
                <tr>
                    <td class="td1">
                    </td>
                    <td>
                        <input type="hidden" name="Enabled" id="Enabled" value="1" />
                    </td>
                </tr>
            </table>
        </div>
        <div class='formBar'>
            <ul>
                <li>
                    <button type="submit" class="btn btn-success btn-sm">
                        保存</button>
                </li>
                <li>
                    <button type="button" class="close btn btn-default btn-sm">
                        取消</button>
                </li>
            </ul>
        </div>
    }
</div>
